home *** CD-ROM | disk | FTP | other *** search
/ Game Cracker (Expanded Edition) / Game Cracker (Expanded Edition).iso / cracks / SV_LR2.ZIP / Lode Runner 2.txt < prev    next >
Encoding:
Text File  |  1998-12-30  |  13.6 KB  |  258 lines

  1.  
  2. Free Information Xchange presents:
  3.  
  4. Lode Runner 2 - CD crack by Static Vengeance - Dec 28th, 1998
  5.  
  6. Requirements:
  7. Hex Editor and Full Install
  8. W32Dasm if you want to follow along
  9.  
  10.     If you where at least 8 in the 80's you'll know the program Doug Smith & Broderbund made famous. The
  11. game I'll talking about is called Lode Runner.  This game was one of the first real arcade type games
  12. developed for the computer gaming market that had good fluid animation.  As far as I remember LR has been
  13. ported over to almost every computer platform there is.  Even Sierra brought out a Win 3.1 (and later a Win95)
  14. version of this game.  However this time GT has released the first "next step" for this game.  That next step
  15. being adding the z factor, or bringing the game into the world of 3D.  Well... there was a french pirate group
  16. in the late 80's that wrote what was basicly THE first 3D lode Runner knock-off for the Apple//GS
  17.     Anyways, the graphics are nice but it's still basically the same game that came out in the 80's.  Like
  18. that first version this latest incarnation has the same program bug.  That bug being a check for the original
  19. disk, with this day and age a CD check.  No problem, well just track it down and FiX that little bug.  Hell!, I
  20. did it with the original Apple][ version without any fancy debuggers/disassemblers.  Just my knowledge of 6502
  21. assembly, switches for disk access and the apple rom entry points.  However this version took much less time and
  22. was a bit easier with the tools that are out there today.
  23.     I started up W32Dasm and disassembled the lr2.exe and to have look at it.  I did that old boring trick
  24. outlined in so many of my tutorials:  I went up to the menu bar and selected Refs and then Data String
  25. References from there.  Then in the pop-up box that apears I grabbed the slider bar and started scrolling down.
  26. I've learned if you see ref for "%a:\" or "%c:\" it's worth double clicking on and checking out. Doing so in
  27. this example will put is in the middle of the CD check.  That check just happens to look something like this:
  28.  
  29. * Referenced by a CALL at Addresses:
  30. |:0046A1E8   , :0046B24F   , :0046B27F                        <-- Called three times 
  31. |
  32. :0046B350 83EC38                  sub esp, 00000038
  33. :0046B353 53                      push ebx
  34. :0046B354 55                      push ebp
  35. :0046B355 56                      push esi
  36. :0046B356 57                      push edi
  37.  
  38. * Reference To: KERNEL32.GetLogicalDrives, Ord:00FAh          <-- Commonly used in CD checks and usually
  39.                                   |                           <--  preceeds a GetDriveTypeA call
  40. :0046B357 FF150C664B00            Call dword ptr [004B660C]
  41. :0046B35D 8B7C2454                mov edi, dword ptr [esp+54]
  42. :0046B361 8B5C244C                mov ebx, dword ptr [esp+4C]
  43.  
  44. * Reference To: KERNEL32.GetVolumeInformationA, Ord:014Fh      <-- Move this call entry point into ebp
  45.                                   |
  46. :0046B365 8B2D08664B00            mov ebp, dword ptr [004B6608]
  47. :0046B36B 89442410                mov dword ptr [esp+10], eax
  48. :0046B36F 33F6                    xor esi, esi
  49.  
  50. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  51. |:0046B3FE(C)
  52. |
  53. :0046B371 8B542410                mov edx, dword ptr [esp+10]
  54. :0046B375 B801000000              mov eax, 00000001
  55. :0046B37A 0FBFCE                  movsx ecx, si
  56. :0046B37D D3E0                    shl eax, cl
  57. :0046B37F 85C2                    test edx, eax
  58. :0046B381 7476                    je 0046B3F9
  59. :0046B383 83C141                  add ecx, 00000041
  60. :0046B386 8D442414                lea eax, dword ptr [esp+14]
  61. :0046B38A 51                      push ecx
  62.  
  63. * Possible StringData Ref from Data Obj ->"%c:\"               <-- The ref that got us here
  64.                                   |
  65. :0046B38B 68403B4A00              push 004A3B40
  66. :0046B390 50                      push eax
  67. :0046B391 E82A71FEFF              call 004524C0
  68. :0046B396 83C40C                  add esp, 0000000C
  69. :0046B399 8D4C2414                lea ecx, dword ptr [esp+14]
  70. :0046B39D 51                      push ecx
  71.  
  72. * Reference To: KERNEL32.GetDriveTypeA, Ord:00DFh               <-- Here's the other common call to CD checks
  73.                                   |
  74. :0046B39E FF1504664B00            Call dword ptr [004B6604]
  75. :0046B3A4 83F805                  cmp eax, 00000005             <-- 05 = CD Rom type drive
  76. :0046B3A7 7550                    jne 0046B3F9
  77. :0046B3A9 66833DF03A4A00FF        cmp word ptr [004A3AF0], FFFF
  78. :0046B3B1 7507                    jne 0046B3BA
  79. :0046B3B3 668935F03A4A00          mov word ptr [004A3AF0], si
  80.  
  81. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  82. |:0046B3B1(C)
  83. |
  84. :0046B3BA 6A00                    push 00000000
  85. :0046B3BC 6A00                    push 00000000
  86. :0046B3BE 6A00                    push 00000000
  87. :0046B3C0 6A00                    push 00000000
  88. :0046B3C2 6A00                    push 00000000
  89. :0046B3C4 8D542434                lea edx, dword ptr [esp+34]
  90. :0046B3C8 6A28                    push 00000028
  91. :0046B3CA 8D44242C                lea eax, dword ptr [esp+2C]
  92. :0046B3CE 52                      push edx
  93. :0046B3CF 50                      push eax
  94. :0046B3D0 FFD5                    call ebp                   <-- Make the GetVolumeInformationA call
  95. :0046B3D2 6A00                    push 00000000
  96. :0046B3D4 6A00                    push 00000000
  97. :0046B3D6 6A00                    push 00000000
  98. :0046B3D8 8D4C2420                lea ecx, dword ptr [esp+20]
  99. :0046B3DC 57                      push edi
  100. :0046B3DD 51                      push ecx
  101. :0046B3DE E8AD19FFFF              call 0045CD90
  102. :0046B3E3 83C414                  add esp, 00000014
  103. :0046B3E6 8D542420                lea edx, dword ptr [esp+20]
  104. :0046B3EA 53                      push ebx                      <-- Push location of returned volume info
  105. :0046B3EB 52                      push edx                      <-- Push location of expected info
  106. :0046B3EC E85F6DFEFF              call 00452150                 <-- Compare the two
  107. :0046B3F1 83C408                  add esp, 00000008             <-- Adjust stack for the push edx & push ebx
  108. :0046B3F4 6685C0                  test ax, ax                   <-- ax=0 then information matched
  109. :0046B3F7 7417                    je 0046B410                   <-- Need to take this jump to continue/play
  110.  
  111. * Referenced by a (U)nconditional or (C)onditional Jump at Addresses:
  112. |:0046B381(C), :0046B3A7(C)
  113. |
  114. :0046B3F9 46                      inc esi           <-- Increment current drive letter
  115. :0046B3FA 6683FE1A                cmp si, 001A      <-- Did we go through all possible letters?
  116. :0046B3FE 0F8C6DFFFFFF            jl 0046B371       <-- Jump less, means we have a few more to try
  117. :0046B404 660DFFFF                or ax, FFFF       <-- Went through them all so make ax = FFFF
  118. :0046B408 5F                      pop edi
  119. :0046B409 5E                      pop esi
  120. :0046B40A 5D                      pop ebp
  121. :0046B40B 5B                      pop ebx
  122. :0046B40C 83C438                  add esp, 00000038
  123. :0046B40F C3                      ret
  124.  
  125. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  126. |:0046B3F7(C)
  127. |                                                   <-- Getting here means to LR2 the CD check passed
  128. :0046B410 668BC6                  mov ax, si        <-- Anything but zero in ax passes
  129. :0046B413 5F                      pop edi
  130. :0046B414 5E                      pop esi
  131. :0046B415 5D                      pop ebp
  132. :0046B416 5B                      pop ebx
  133. :0046B417 83C438                  add esp, 00000038
  134. :0046B41A C3                      ret
  135.  
  136.     Well with that section of code explained, let's take a look at the code that surounds the
  137. callers to the above section of code.  First let's start with the call from 46A1E8:
  138.  
  139.  -- Program code --
  140. :0046A1DC 8D4C2408                lea ecx, dword ptr [esp+08]
  141. :0046A1E0 51                      push ecx
  142. :0046A1E1 6A00                    push 00000000
  143.  
  144. * Possible StringData Ref from Data Obj ->"LR2"       <-- Volume name of the game CD
  145.                                   |
  146. :0046A1E3 68E43A4A00              push 004A3AE4
  147. :0046A1E8 E863110000              call 0046B350       <-- Check for the original CD
  148. :0046A1ED 83C40C                  add esp, 0000000C   <-- Adjust stack for information that was pushed
  149. :0046A1F0 6685C0                  test ax, ax         <-- Check flag value in ax
  150. :0046A1F3 7C12                    jl 0046A207         <-- Jump less or ax=0000-7FFF, 8000-FFFF will fail
  151. :0046A1F5 8D542408                lea edx, dword ptr [esp+08]
  152. :0046A1F9 52                      push edx
  153. :0046A1FA 68C0F44A00              push 004AF4C0
  154. :0046A1FF E89C7FFEFF              call 004521A0
  155. :0046A204 83C408                  add esp, 00000008
  156.  
  157. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  158. |:0046A1F3(C)                                         <-- Getting here continues without problems
  159. |
  160. :0046A207 E8E4C1FEFF              call 004563F0
  161. :0046A20C 5F                      pop edi
  162. :0046A20D 66B80100                mov ax, 0001
  163. :0046A211 5E                      pop esi
  164. :0046A212 81C4FC000000            add esp, 000000FC
  165. :0046A218 C3                      ret
  166.  
  167.     To kill the CD check for this routine, just change the call to mov eax, 00000001.  This way the
  168. jl will always be taken and the game will continue normally.   Up next is the second caller:
  169.  
  170. * Referenced by a CALL at Addresses:
  171. |:00450969   , :0046B2D6   , :0046B301   , :0046B310   , :0046B329   <-- Called 5 times
  172. |
  173. :0046B240 8B4C2408                mov ecx, dword ptr [esp+08]
  174. :0046B244 8B542404                mov edx, dword ptr [esp+04]
  175. :0046B248 8D442408                lea eax, dword ptr [esp+08]
  176. :0046B24C 50                      push eax
  177. :0046B24D 51                      push ecx
  178. :0046B24E 52                      push edx              <-- Push info on the stack
  179. :0046B24F E8FC000000              call 0046B350         <-- Do the CD check
  180. :0046B254 83C40C                  add esp, 0000000C     <-- Adjust stack for info pushed
  181. :0046B257 33C9                    xor ecx, ecx          <-- Zero out ecx
  182. :0046B259 663DFFFF                cmp ax, FFFF          <-- Compare agianst known fail value
  183. :0046B25D 0F95C1                  setne cl              <-- Set not equal in lower 8 bits of C register
  184. :0046B260 668BC1                  mov ax, cx            <-- Move the new flag value from cx into ax
  185. :0046B263 C3                      ret                   <-- Return to the caller
  186.  
  187.     Once again, changing the call to the CD check to mov eax, 00000001 kills the CD check for this
  188. section of code.  On the the third and last section to check out:
  189.  
  190. * Referenced by a CALL at Address:
  191. |:0045427D   
  192. |
  193. :0046B270 8B4C2408                mov ecx, dword ptr [esp+08]
  194. :0046B274 8B542404                mov edx, dword ptr [esp+04]
  195. :0046B278 8D442408                lea eax, dword ptr [esp+08]
  196. :0046B27C 50                      push eax
  197. :0046B27D 51                      push ecx
  198. :0046B27E 52                      push edx                     <-- Push info on the stack
  199. :0046B27F E8CC000000              call 0046B350                <-- Do the CD check
  200. :0046B284 83C40C                  add esp, 0000000C            <-- Adjust stack for info pushed
  201. :0046B287 663DFFFF                cmp ax, FFFF                 <-- Compare agianst known fail value
  202. :0046B28B 7414                    je 0046B2A1                  <-- Take this jump if CD check failed
  203. :0046B28D 8B0DF03A4A00            mov ecx, dword ptr [004A3AF0]
  204. :0046B293 2BC1                    sub eax, ecx
  205. :0046B295 8B4C240C                mov ecx, dword ptr [esp+0C]
  206. :0046B299 668901                  mov word ptr [ecx], ax
  207. :0046B29C 66B80100                mov ax, 0001                 <-- Means the CD check passed from this section
  208. :0046B2A0 C3                      ret                          <-- Return to caller
  209.  
  210. * Referenced by a (U)nconditional or (C)onditional Jump at Address:
  211. |:0046B28B(C)
  212. |
  213. :0046B2A1 8B54240C                mov edx, dword ptr [esp+0C]
  214. :0046B2A5 6633C0                  xor ax, ax                   <-- Set up for failed CD check
  215. :0046B2A8 66C702FFFF              mov word ptr [edx], FFFF
  216. :0046B2AD C3                      ret                          <-- Return to caller
  217.  
  218.     Like the last two before this section, changing the call to mov eax, 00000001 will efectively kill the
  219. CD check.  Making all three edits to the exe will result in a version that can be played off the hard drive
  220. without the need for the original CD to be on-line.  There is also an updated version 1.1 on the net you can
  221. download.  The CD check is the same with there being one additional caller.  So you'll have to make four edits
  222. for that one istead of three.  The old step by step method would be:
  223.  
  224. 1.  Install the game
  225. 2.  Make the following edit based on your version:
  226.  
  227. For version 1.0 off the CD edit lr2.exe 
  228. =============================================
  229. Search for: E8 63 11 00 00  at offset 432.592
  230. Change to : B8 01 00 00 00
  231.  
  232. Search for: E8 FC 00 00 00  at offset 435,791
  233. Change to : B8 01 00 00 00
  234.  
  235. Search for: E8 CC 00 00 00  at offset 435,839
  236. Change to : B8 01 00 00 00
  237.  
  238.  
  239. For version 1.1 edit lr2.exe off the net
  240. =============================================
  241. Search for: E8 26 F7 02 00  at offset 551,610
  242. Change to : B8 01 00 00 00
  243.  
  244. Search for: E8 EE 44 01 00  at offset 662,770
  245. Change to : B8 01 00 00 00
  246.  
  247. Search for: E8 DF 00 00 00  at offset 745,729
  248. Change to : B8 01 00 00 00
  249.  
  250. Search for: E8 B2 00 00 00  at offset 747,774
  251. Change to : B8 01 00 00 00
  252.  
  253. 3.  Enjoy the game.
  254.  
  255.     Another game has been FiX'ed and freed of it's need for the CD to be on line.
  256.  
  257. Static Vengeance
  258.